package com.sgb.kjwl.view.ui.adapter.machine;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.MachineOutEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;
import com.swgk.core.util.MDateUtil;

import java.util.List;

@Deprecated
public class MachineOutAdapter extends BaseRecycleAdapter<MachineOutEntity> {

    private TextView contentView;
    private TextView priceView;

    public MachineOutAdapter(Context context, List<MachineOutEntity> datas) {
        super(context, R.layout.item_machine_out, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final MachineOutEntity entity) {
        holder.setBinding(BR.viewModel, entity);
        contentView = holder.getItem().findViewById(R.id.content_view);
        priceView = holder.getItem().findViewById(R.id.price_view);
        contentView.setText(entity.getBrandName() + " | " + entity.getModelName() + " | " + entity.getRefreshTime());
        priceView.setText(entity.getPrice() + entity.getPriceUnitName());
    }
}
